import { pubRequire } from '@utils/public'
const baseUrl = '/activities'

//集赞列表-获取活动下拉数据
export function getActivitiesNameList(callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/collections-likes/activities-names`,
    {},
    callBack,
    errBack
  )
}

//集赞列表-根据条件查询活动列表
export function getCollectPraiseList(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/collections-likes`,
    params,
    callBack,
    errBack
  )
}

//集赞列表-查看详情
export function getCollectLikesInfo(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/collections-likes/info`,
    params,
    callBack,
    errBack
  )
}

//集赞列表-根据id查询数据统计
export function getCollectLikesdata(activityId, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/collections-likes/data/${activityId}`,
    {},
    callBack,
    errBack
  )
}
//审核通过
export function reviewedPass(id, callBack, errBack) {
  return pubRequire(
    'patch',
    `${baseUrl}/collections-likes/${id}/pass`,
    {},
    callBack,
    errBack
  )
}
// 审核不通过
export function reviewedFail(id, callBack, errBack) {
  return pubRequire(
    'patch',
    `${baseUrl}/collections-likes/${id}/unpass`,
    {},
    callBack,
    errBack
  )
}
